package com.glacier.yuyuan.modules.admin.sys.domain;

import java.io.Serializable;
import java.util.Objects;

/**
 * date 2023-01-07 17:34
 * 角色和机构关联类
 *
 * @author glacier
 * @version 1.0.0
 */
public class RoleOffice implements Serializable {

    private static final long serialVersionUID = -3323520863629155393L;
    /**
     * 角色id
     */
    private String roleId;

    /**
     * 机构id
     */
    private String officeId;

    public RoleOffice() {
    }

    public RoleOffice(String roleId, String officeId) {
        this.roleId = roleId;
        this.officeId = officeId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getOfficeId() {
        return officeId;
    }

    public void setOfficeId(String officeId) {
        this.officeId = officeId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof RoleOffice)) return false;
        RoleOffice that = (RoleOffice) o;
        return Objects.equals(roleId, that.roleId) && Objects.equals(officeId, that.officeId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleId, officeId);
    }

    @Override
    public String toString() {
        return "RoleOffice{" +
                "roleId='" + roleId + '\'' +
                ", officeId='" + officeId + '\'' +
                '}';
    }
}
